import 'package:flutter_riverpod/flutter_riverpod.dart';

// 盒子数量状态管理
class BoxCountNotifier extends StateNotifier<int> {
  BoxCountNotifier() : super(6); // 初始数量为6个盒子

  void increment() {
    state++;
  }

  void decrement() {
    if (state > 1) {
      state--;
    }
  }
}

final boxCountProvider = StateNotifierProvider<BoxCountNotifier, int>((ref) {
  return BoxCountNotifier();
}); 